import numpy as np
import pandas as pd

pd1=pd.DataFrame(np.random.randint(1,151,size=(10,3)))
pd1

pd2=pd.read_excel('./18级高一体测成绩汇总.xls',sheet_name = 0)
pd2


def convert(x):
    x=str(x)
    x=x.replace(":","'")    
   
    if "'" in x:
        m,s=x.split("'")
        return float(m) + float(int(s)/60)
    else:
        return float(x)
  



pd2['男1000米跑']=pd2['男1000米跑'].apply(convert)
pd2

